<?php
/* @var $this BeritaController */
/* @var $model Berita */

?>

<!--<h1>Daftar Berita</h1>-->

            
<?php $this->widget('zii.widgets.grid.CGridView', array(
	'id'=>'cni-berita-grid',
	'dataProvider'=>$model,
    'enablePagination'=>true,
    'enableSorting'=>true,
    'cssFile' => Yii::app()->baseUrl .'/css/styles-grid-admin.css',
//	'filter'=>$model,
	'columns'=>array(
        array(
            'header' => 'No.',
            'name' => 'parent_id',
            'type' => 'raw',
            'value' => '$data["no"]'
        ),
        array(
            'header' => 'Kategori',
            'name' => 'parent_id',
            'type' => 'raw',
            'value' => '$data["kategori"]'
        ),
        array(
            'header' => 'Nama',
            'name' => 'nama',
            'type' => 'raw',
            'value' => 'l(e($data["nama"]),url("/backend/berita/update/".$data["id"]))'
        ),
        array(
            'header' => 'Status',
            'name' => 'status',
            'type' => 'raw',
            'value' => 'l(e($data["status"] == 1 ? "publish" : "unpublish"),
                url("/backend/berita/ubahstatus/".$data["id"]))'
        ),
        /*'kategori',
        'nama',
        'isi',
        tatus',
        'tgl_buat',
        'tgl_update',
        'ip_update',
        */

	),
)); ?>
